#pragma once

#include <Util/MsgQueueExThreads.h>


struct download_pack
{
	HWND imcc;
	CString str_file_name; 
	CString str_url;
};
struct http_download
{
	std::string save_file_name; 
	std::string url;
	std::string md5;
	int session_id;
};

class http_download_thread 
	: public _UTIL::CMsgQueueExThreads<download_pack>
{
public:
	http_download_thread(void);
public:
	~http_download_thread(void);

	virtual void OnProcMsgQueueStart();

	virtual void LoopProc(download_pack* pMsgPack, PWORKER_PARAMETER work_para);

	BOOL push_message(CString str_url, CString str_file_name, HWND imcc);

	virtual BOOL OnWorkerStart(PWORKER_PARAMETER work_para);

	virtual BOOL OnWorkerEnd(PWORKER_PARAMETER work_para);
};
